<?php
for ($i = 0; $i < 20; $i++) {
    for ($j = 0; $j < 33; $j++) {
        for ($k = 0; $k < 300; $k++) {
            if (5 * $i + 3 * $j + $k / 3 === 100 and $i !== 0 and $j !== 0 and $k !== 0) {
                if ($i + $j + $k == 100) {
                    echo "公鸡有" . $i . "只";
                    echo "<br>";
                    echo "母鸡有" . $j . "只";
                    echo "<br>";
                    echo "小鸡有" . $k . "只";
                    echo "<br>";
                    echo "***********";
                    echo "<br>";
                }
            }
        }
    }
}